<template>
	<view class="fpmw-page">
		<view class="fpmw-content">
			<view class="fpmw-header">
				<text class="header-title"><span>{{info.title||''}}</span></text>
			</view>
			<view class="fpmw-body">
				<view>
					<text> {{info.content||''}}</text>
				</view>
			</view>
			<view class="fpmw-footer">
				<text><span>非常感谢您的支持！</span></text>
			</view>
		</view>
	</view>
</template>

<script>
	import {helpDetails} from '../../apirequest/api.js';
	export default {
		data() {
			return {
				id:0,
				info:[]
			}
		},
		onLoad(o) {
			this.id = o.id || 0;
			if (!this.id) {
				uni.showToast({
					title:'参数错误',
					icon:"error"
				})
				setTimeout(function(){
					uni.navigateBack({
						delta:0
					});
				},1000);
				return;
			}
			this.loadData();
		},
		methods: {
			//获取数据
			loadData: function () {
			  helpDetails({id:this.id}).then((res) => {
			  		if(res.code == 1){
						this.info = res.data;
					} else{
						uni.showToast({
							title:res.msg,
							icon:"error"
						})
						setTimeout(function(){
							uni.navigateBack({
								delta:0
							});
						},1000)
					}
			  }).catch(err => {
			  	 console.log(err)
			  })
			},
		}
	}
</script>

<style>
	page {
		background: #f7f8f9;
	}

	.fpmw-page {
		display: flex;
		justify-content: center
	}

	.fpmw-page .fpmw-content {
		width: 336px;
		border-radius: 9px;
		background-color: #fff;
		display: flex;
		flex-flow: column;
		margin-top: 12px
	}

	.fpmw-header {
		padding: 9px;
		border-bottom: 1px #f6f5f5 solid
	}

	.fpmw-header .header-title {
		    font-size: 32rpx;;
		font-weight: 700
	}

	.fpmw-body {
		padding: 9px;
		border-bottom: 1px #f6f5f5 solid
	}

	.fpmw-body image {
		max-width: 100%
	}

	.fpmw-footer {
		padding: 9px;
		text-align: center;
		font-size: 24rpx
	}
</style>
